<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>基本信息</title>
	    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
	<style type="text/css">
		.step3_list li label{width: 6.3rem;}
	</style>
</head>

<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
		<h1 class="mui-title">基本信息</h1>
	</header>
	<div class="mui-content">
		<ul class="step_nav">
			<li >
				<p class="nam">第1步</p>
				<p class="nr">基本信息</p>
			</li>
			<li class="iconfont icon-jiantou4"></li>
			<li class="active">
				<p class="nam">第2步</p>
				<p class="nr">注册信息</p>
			</li>
			<li class="iconfont icon-jiantou4"></li>
			<li>
				<p class="nam">第3步</p>
				<p class="nr">结算信息</p>
			</li>
			<li class="iconfont icon-jiantou4"></li>
			<li>
				<p class="nam">第4步</p>
				<p class="nr">照片资料</p>
			</li>
		</ul>
		<form  id="my_form" method="POST">  
		<ul class="mui-table-view step3_list">
			{if $agent_type==2}
			{else/}
			<li class="mui-table-view-cell">
		        <label><em>*</em>注册名称</label>
		        <input type="text" name="regist_name" value="{$qy.regist_name}"   class="mui-input-group" placeholder="请输入营业执照注册名称" style="border: 0;" />
		    </li>
		     <li class="mui-table-view-cell">
		        <label><em>*</em>注册地址</label>
		        <input type="text" class="mui-input-group" value="{$qy.regist_address}" name="regist_address" placeholder="请输入营业执照注册地址" style="border: 0;" />
		    </li>
		   
		     <li class="mui-table-view-cell">
		        <label><em>*</em>营业执照编号</label>
		        <input type="text" name="license" value="{$qy.license}"  class="mui-input-group" placeholder="请填写营业执照编号" style="border: 0;" />
		    </li>
		    <li class="mui-table-view-cell">
		        <label><em>*</em>主营业务</label>
		        <input type="text" name="main_business" value="{$qy.main_business}" class="mui-input-group" placeholder="请填写主营业务为必填项" style="border: 0;" />
		    </li>
		     <li class="mui-table-view-cell">
		        <label><em>*</em>营业期限</label>
		       <input  name='business_time1' value="{$qy.business_time1}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" type='text' placeholder="开始时间" style="border: 0;width: 33%;" />
		        <input  name='business_time2' value="{$qy.business_time2}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" type='text' placeholder="结束时间" style="border: 0;width: 33%;" />
		    </li>
			{/if}
		     <li class="mui-table-view-cell">
		        <label><em>*</em>法人姓名</label>
		        <input type="text" name="legal_name" value="{$qy.legal_name}"  class="mui-input-group" placeholder="请填写法人姓名" style="border: 0;" />
		    </li>
		     <li class="mui-table-view-cell">
		        <label><em>*</em>法人身份证</label>
		        <input type="text" name="document_no" value="{$qy.document_no}" class="mui-input-group" placeholder="请填写法人身份证" style="border: 0;" />
		    </li>
		       <li class="mui-table-view-cell">
		        <label><em>*</em>身份证有效期</label>
		        <span class="clearfix" style="display: table-cell; vertical-align: middle;">
			       	<input  name='document_time1'  value="{$qy.document_time1}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" type='text' placeholder="开始时间" style="border: 0;width: 33%; float: left;" />
			        <input  name='document_time2' value="{$qy.document_time2}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" type='text' placeholder="结束时间" style="border: 0;width: 33%; float: left; margin-left: 5px;" />
		        </span>
		    </li>
		</ul>
		
		<button class="qiany_btn" type="button">下一步</button>
		</form>
	</div>
</body>

</html>
{include file="public/footer" /}
<script src="__INDEX__/js/datepicker/WdatePicker.js"></script>
<script>
	$(".qiany_btn").click(function(){
		 var agent_type='{$agent_type}';
		if(agent_type!=2){
			if($("input[name='regist_name']").val()==''){
			layer.msg("请输入营业执照注册名称");
			return;
			}
			if($("input[name='regist_address']").val()==''){
				layer.msg("请输入营业执照注册地址");
				return;
			}
			if($("input[name='license']").val()==''){
				layer.msg("请填写营业执照编号");
				return;
			}
			if($("input[name='main_business']").val()==''){
				layer.msg("请填写主营业务");
				return;
			}
			if($("input[name='business_time1']").val()==''){
				layer.msg("请输入营业开始时间");
				return;
			}
			if($("input[name='business_time2']").val()==''){
				layer.msg("请输入营业结束时间");
				return;
			}
		}
		if($("input[name='legal_name']").val()==''){
				layer.msg("请填写法人姓名");
				return;
			}
			if($("input[name='document_no']").val()==''){
				layer.msg("请填写法人身份证");
				return;
			}
			if($("input[name='document_time1']").val()==''||$("input[name='document_time2']").val()==''){
				layer.msg("请填写法人证件有效期");
				return;
			}
		$.ajax({
				type: 'post',
				url: 'step4',
				data: $('#my_form').serialize(),
				success: function(data) {
							location.href = "{:url('step5')}";
				}
			})
	

	})
</script>